﻿using DomainModel;
using FluentNHibernate.Mapping;

namespace Repository.NHibernate.Mapping
{
    public class TimetableMap : ClassMap<Timetable>
    {
        public TimetableMap()
        {
            Id(x => x.Id).GeneratedBy.Native();
            Map(x => x.Week);
            Map(x => x.Day);
            Map(x => x.LessonNo);
            References<Group>(x => x.Group);
            References<Subgroup>(x => x.Subgroup);
            References<Subject>(x => x.Subject);
            Map(x => x.SubjectType).CustomType(typeof(SubjectType));
            References<User>(x => x.Teacher);
            Map(x => x.Room);
        }
    }
}